#define _CRT_SECURE_NO_WARNINGS 1

#include"string.h"

void test1()
{
	zjx::string s("hello world!");
	zjx::string s1("hahaha");
	zjx::string s2("xxxxx");
	s1 = s = s2;
	std::cout << s.c_str() << std::endl;
	std::cout << s1.c_str() << std::endl;
	std::cout << s2.c_str() << std::endl;
}

void test2()
{
	zjx::string s1("hello world!");

	//s1.push_back('x');
	//s1.push_back('x');
	//s1.push_back('x');
	//cout << s1 << endl;
	//s1.append("11111111111");
	//cout << s1 << endl;
	//s1 += "22222222222";
	//cout << s1 << endl;

	//s1.insert(0, 3, 'x');
	//cout << s1 << endl;
	//s1.insert(15, "111111111");
	//cout << s1 << endl;
	//s1.erase(6);
	//cout << s1 << endl;

	//s1.erase();
	//cout << s1 << endl;

	//getline(cin, s1);
	//cout << s1 << endl;

	//cin >> s1;
	//cout << s1 << endl;
	//zjx::string s2 = s1.substr(6);
	//for (auto e : s2)
	//{
	//	cout << e << " ";
	//}
	//cout << endl;

	//size_t pos = s1.find("wor");
	//cout << pos << endl;

	zjx::string s2("hahahaha");
	s1 = s2;
	cout << s1 << endl;

}


int main()
{
	//test1();
	test2();
	return 0;
}